
#ifndef TEXTURE2_H_
#define TEXTURE2_H_

#include "Core.h"

namespace p2 {

class Texture2
{
public:
	inline Texture2();

	static uint32 nextPowerOfTwo(uint32 v);

	bool fromFile(String name);
	bool fromFile(String name, GLint wrapS, GLint wrapT);
	bool fromText(String text);

	inline GLsizei getHeight() const;
	inline GLuint getId() const;
	inline GLsizei getWidth() const;

private:
	GLuint _id;
    GLsizei _width, _height;
};

inline Texture2::Texture2()
:	_id(0), _width(0), _height(0)
{
}

GLsizei Texture2::getHeight() const
{
	return _height;
}

GLuint Texture2::getId() const
{
	return _id;
}

GLsizei Texture2::getWidth() const
{
	return _width;
}

}

#endif	//TEXTURE2_H_
